package com.ruoyi.youtian.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.youtian.mapper.TEarlyWarningRecordDetailMapper;
import com.ruoyi.youtian.domain.TEarlyWarningRecordDetail;
import com.ruoyi.youtian.service.ITEarlyWarningRecordDetailService;
import com.ruoyi.common.core.text.Convert;

/**
 * 触发预警记录详情Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-10-17
 */
@Service
public class TEarlyWarningRecordDetailServiceImpl implements ITEarlyWarningRecordDetailService 
{
    @Autowired
    private TEarlyWarningRecordDetailMapper tEarlyWarningRecordDetailMapper;

    /**
     * 查询触发预警记录详情
     * 
     * @param id 触发预警记录详情主键
     * @return 触发预警记录详情
     */
    @Override
    public TEarlyWarningRecordDetail selectTEarlyWarningRecordDetailById(Long id)
    {
        return tEarlyWarningRecordDetailMapper.selectTEarlyWarningRecordDetailById(id);
    }

    /**
     * 查询触发预警记录详情列表
     * 
     * @param tEarlyWarningRecordDetail 触发预警记录详情
     * @return 触发预警记录详情
     */
    @Override
    public List<TEarlyWarningRecordDetail> selectTEarlyWarningRecordDetailList(TEarlyWarningRecordDetail tEarlyWarningRecordDetail)
    {
        return tEarlyWarningRecordDetailMapper.selectTEarlyWarningRecordDetailList(tEarlyWarningRecordDetail);
    }

    /**
     * 新增触发预警记录详情
     * 
     * @param tEarlyWarningRecordDetail 触发预警记录详情
     * @return 结果
     */
    @Override
    public int insertTEarlyWarningRecordDetail(TEarlyWarningRecordDetail tEarlyWarningRecordDetail)
    {
        return tEarlyWarningRecordDetailMapper.insertTEarlyWarningRecordDetail(tEarlyWarningRecordDetail);
    }

    /**
     * 修改触发预警记录详情
     * 
     * @param tEarlyWarningRecordDetail 触发预警记录详情
     * @return 结果
     */
    @Override
    public int updateTEarlyWarningRecordDetail(TEarlyWarningRecordDetail tEarlyWarningRecordDetail)
    {
        return tEarlyWarningRecordDetailMapper.updateTEarlyWarningRecordDetail(tEarlyWarningRecordDetail);
    }

    /**
     * 批量删除触发预警记录详情
     * 
     * @param ids 需要删除的触发预警记录详情主键
     * @return 结果
     */
    @Override
    public int deleteTEarlyWarningRecordDetailByIds(String ids)
    {
        return tEarlyWarningRecordDetailMapper.deleteTEarlyWarningRecordDetailByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除触发预警记录详情信息
     * 
     * @param id 触发预警记录详情主键
     * @return 结果
     */
    @Override
    public int deleteTEarlyWarningRecordDetailById(Long id)
    {
        return tEarlyWarningRecordDetailMapper.deleteTEarlyWarningRecordDetailById(id);
    }
}
